/*
 * EdgeIDEvaluator.c
 *
 *  Created on: Jun 5, 2013
 *      Author: koldar
 */

#include "main-tools.h"
#include "edgeIDEvaluator.h"


PedgeIDEvaluator initEdgeIDEvaluator(int i,int j,int eval){
	PedgeIDEvaluator result=(PedgeIDEvaluator)malloc(sizeof(EdgeIDEvaluator));
	checkMalloc(result,"EdgeIDEvalutator.c:initEdgeIDEvaluator:1");
	result->edge=initEdgeID(i,j);
	validateEdgeID(result->edge);
	result->valutation=eval;
	return result;
}

//TODO testing
void freeEdgeIDEvaluator(PedgeIDEvaluator obj){
	freeEdgeID(obj->edge);
	free(obj);
}

void printEdgeIDEvaluator(FILE* f,PedgeIDEvaluator obj){
	printEdgeID(f,obj->edge);
	fprintf(f," [ %3d ]\n",obj->valutation);
}

